SOURCES=boot/boot.o \
		init/main.o init/idt.o init/gdt.o init/dt.o\
		kernel/console.o kernel/port.o kernel/string.o kernel/version.o kernel/entry.o
		
CFLAGS=-nostdlib -nostdinc -fno-builtin -fno-stack-protector -m32
LDFLAGS=-Tlink.ld
ASFLAGS=-felf

all: $(SOURCES) link

clean:
	-rm *.o kernel/*.o init/*.o kernel.img
	reset
link:
	386-ld $(LDFLAGS) -o kernel.img $(SOURCES)

.s.o:
	nasm $(ASFLAGS) $<
	
install:
	osdev_mount_flopy.sh
	sudo cp kernel.img ../mnt/boot/kernel
	osdev_umount_flopy.sh

